<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCategoryConfigsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('category_configs', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('category_id')->notNull()->default(0)->comment('分类id');
            $table->string('name')->notNull()->default('')->comment('')->comment('分类名称');
            $table->tinyInteger('status')->notNull()->default(0)->comment('是否禁用 0否 1禁用');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('category_configs');
    }
}
